Business_List.render = function() {

    var Business_List_cache = {};

    var Business_List = {

        init: function() {
            var that = this;
            $.ajax({
                url: COMMONURL + 'api/Account/GetSendMeum',
                type: 'post',
                dataType: 'jsonp',
                jsonp: 'jsonpcallback',
                data: {
                    type: 5,
                    token: $.cookie('token')
                }
            }).done(function(data) {
                var menu = data.menu;
                var compiled = _.template($("#Business_List_nav").html());
                var compiled_cont = _.template($("#Business_List_cont").html());
                $("#fiHeader").html(compiled(menu));
                $("#myTabContent").html(compiled_cont(menu));

                that.firstaction();
                that.shownaction();
            });

        },
        shownaction: function() {
            $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {

                var idname = $(e.target).attr('href').replace('#', '');
                 var index = $('a[data-toggle="tab"]').index($(e.target))

                $.cookie('Busines_List_index', idname);
                $.cookie('Busines_List_point', index);
                if (Business_List_cache[idname]) {
                    $('#' + idname).html(Business_List_cache[idname]);
                } else {
                    $.ajax({
                        url: idname + '.html'
                    }).done(function(data) {

                        Business_List_cache[idname] = data;
                        $('#' + idname).html(data);


                    })
                }
            })
        },
        firstaction: function() {
             var firstName=$('a[data-toggle="tab"]').eq(0).attr('href').replace('#', '');
            //var point = location.hash.replace('#','').split("&")[1];
            if($.cookie('Busines_List_point')!=0 && $.cookie('Busines_List_point')){
                 if(!!$.cookie('Busines_List_index')){
                firstName = $.cookie('Busines_List_index');
                $('a[href="#'+firstName+'"]').tab('show');
                return;
                }
            }
          else{
         
            if($.cookie('Busines_List_index') && firstName != $.cookie('Busines_List_index')){
                firstName=$.cookie('Busines_List_index');
                $('a[href="#'+firstName+'"]').tab('show');
              
            }else{
            
                if (Business_List_cache[firstName]) {

                $('#' + firstName).html(Business_List_cache[firstName]);
            } else {

                $.ajax({
                    url: firstName + '.html'
                }).done(function(data) {
                    Business_List_cache[firstName] = data;
                    $('#' + firstName).html(data);


                })
            }
            }
            
        }
        }

   }
    Business_List.init();

}
